import request from '@/utils/request'

// 查询应收需求单列表
export function listReciveReq(query) {
  return request({
    url: '/finance/reciveReq/list',
    method: 'get',
    params: query
  })
}

// 查询应收需求单详细
export function getReciveReqById(id) {
  return request({
    url: '/finance/reciveReq/' + id,
    method: 'get'
  })
}

// 校验订单编号是否存在
export function checkReciveReqOrderCode(orderCode) {
  return request({
    url: '/finance/reciveReq/check/' + orderCode,
    method: 'get',
  })
}


// 新增应收需求单
export function addReciveReq(data) {
  return request({
    url: '/finance/reciveReq',
    method: 'post',
    data: data
  })
}

// 修改应收需求单
export function updateReciveReq(data) {
  return request({
    url: '/finance/reciveReq',
    method: 'put',
    data: data
  })
}

// 删除应收需求单
export function delReciveReq(id) {
  return request({
    url: '/finance/reciveReq/' + id,
    method: 'delete'
  })
}
